<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div{
            width:480px;
            height: 480px;
            background: url("erik_ce204002.jpg");
        }
    </style>
</head>

<body>
<div id="erik"></div>
<script>
window.onload=function(){
    var erik=document.getElementById("erik");
    var Y = 480;

    function gif() {
        erik.style.backgroundPositionY = '-' + Y + 'px';
        if(Y>8160){
            Y = 480;
        }else{
            Y += 480
        }
        
    }
        setInterval(gif, 100);
    }
</script>   
</body>
</html>